<html>
    
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Report Input</title>
        <style type="text/css">
            body     { font-family: "Times New Roman";
                       color: black;
            }
            h1       { font-family: "Times New Roman";
                       color: blue; }
        </style>
    </head>
    <body background="xp-purple.jpg">
       
              <%
                  model.DataBaseConnection conn = new model.DataBaseConnection();
                    try{
                        String insert = "insert into nilai(nama,jawaban1,jawaban2, jawaban3, jawaban4, jawaban5) "
                                + "values('" + request.getParameter("nama") + "',"
                                + "'" + request.getParameter("jawaban1") + "',"
                                + "'" + request.getParameter("jawaban2") + "',"
                                + "'" + request.getParameter("jawaban3") + "',"
                                + "'" + request.getParameter("jawaban4") + "',"
                                + "'" + request.getParameter("jawaban5") + "')";
                                
                        java.sql.Statement statement = conn.getConnection().createStatement();
                        int OK = statement.executeUpdate(insert);
                        if (OK != 0) {
        %>
        
        <strong>UPDATE SUKSES!!!</strong>
        <br><br>
       <%try {
           
            String query = "select * from nilai";
            java.sql.ResultSet result = statement.executeQuery(query);
        %>
       
            <%
            statement.close();
            } catch(Exception ex){
            System.out.println("message: "+ex.getMessage());
            }
            }else{%>
            <strong>UPDATE GAGAL!!!</strong>
            <%}
            statement.close();
            } catch(Exception ex){
            out.println("message: "+ex.getMessage());
            }
            %>
        <a href="testOnline.jsp">Input Again..!!!</a>
        <input type="submit" value="Balik">
        </form>
    </body>
</html>